package wwl.lsf.hellospringboot.test;

import java.lang.reflect.InvocationTargetException;

public class 反射 {

  public static void main(String[] args) {
    String clientCnxnSocketName = "wwl.lsf.hellospringboot.test.Student";

    try {
      Object o = Class.forName(clientCnxnSocketName).getDeclaredConstructor()
          .newInstance();
      System.out.println("o = " + o);
    } catch (InstantiationException e) {
      e.printStackTrace();
    } catch (IllegalAccessException e) {
      e.printStackTrace();
    } catch (InvocationTargetException e) {
      e.printStackTrace();
    } catch (NoSuchMethodException e) {
      e.printStackTrace();
    } catch (ClassNotFoundException e) {
      e.printStackTrace();
    }
  }
}

class Student extends Thread {

  private String name;

  public Student(String name) {
    this.name = name;
    setDaemon(true);
  }

  protected Student() {
  }


}